package com.xlh.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

//@RestController
public class NacosConfigController {
    @Autowired
    private ConfigurableApplicationContext applicationContext;
    @GetMapping("/nacos-config-test1")
    public String nacosConfingTest1() {
        return  applicationContext.getEnvironment().getProperty("config.appName");
    }
}
